<template>
	<view class="credit-cont">
		<view class="credit-cont-head">
			<view class="credit-cont-head-limit">￥{{loadData.pay_money}}</view>
			<!-- <view class="credit-cont-head-text">红包授信</view> -->
		</view>	
		<view class="credit-cont-find">
			<view class="credit-cont-find-title">手机号查找代付人</view>
			<view class="credit-cont-find-info flex f-a-center">
				<view class="credit-cont-find-info-area">+86</view>
				<view class="credit-cont-find-info-cont flex f-a-center">
					<input class="credit-cont-find-info-cont-input" type="number" placeholder="输入对方手机号" v-model="mobile" />
					<!-- <image class="credit-cont-find-info-cont-icon" src="../../static/icons/credit/contacts.png"></image> -->
				</view>
			</view>
			<view class="credit-cont-find-btn" @tap="find">发送</view>
		</view>
		<!-- <view class="credit-cont-list">
			<view class="credit-cont-list-title">快速选择代付人</view>
			<view class="credit-cont-list-page">
				<view class="credit-cont-list-page-item flex f-a-center">
					<image class="credit-cont-list-page-item-icon" src="../../static/icons/agent_jewel/agent_i3.png"></image>
					<view class="credit-cont-list-page-item-info">
						<view class="credit-cont-list-page-item-info-id">**853</view>
						<view class="credit-cont-list-page-item-info-name">*凤华</view>
					</view>
				</view>
			</view>
		</view> -->
	</view>
</template>

<script>
	import jewel from '@/common/common_zb.js';
	export default {
		data() {
			return {
				mobile:'',
				loadData:{}
			};
		},
		methods: {
			find(){
				let that = this
				uni.showLoading({
					title:'发送中..'
				})
				jewel.post('order/search_pay_for_member',{mobile:that.mobile},true,function(res){
					if(res.data.code == 0){
						that.loadData.pay_for_member_id = res.data.data.pay_for_member_id
						jewel.post('order/order',that.loadData,true,function(res){
							if(res.data.code == 0){
								uni.hideLoading()
								uni.navigateTo({
									url:'/pages/credit/credit_helporder?order_no='+res.data.data.order_no + '&source=' + that.loadData.source + '&pagetype=self'
								})
							}else{
								jewel.showToast(res.data.msg)
							}
						})
					}else{
						uni.hideLoading()
						jewel.showToast(res.data.msg)
					}
				})
			}
		},
		onLoad(option) {
			this.loadData = JSON.parse(option.data)
		}
	};
</script>

<style lang="scss" scoped>
	page{
		height: 100%;
		width: 100%;
	}
	.flex{
		display: flex;
	}
	.f-a-center{
		align-items: center;
	}
	.f-j-center{
		justify-content: center;
	}
	.credit-cont{
		&-head{
			line-height: 180rpx;
			background-color: #0aac2a;
			text-align: center;
			color: #FFFFFF;
			&-limit{
				font-weight: bold;
				font-size: 60rpx;
			}
			&-text{
				font-size: 36rpx;
				padding-top: 4rpx;
			}
		}
		&-find{
			padding: 0 35rpx;
			&-title{
				font-size: 34rpx;
				padding-top: 38rpx;
				padding-bottom: 34rpx;
			}
			&-info{
				&-area{
					font-size: 40rpx;
					width: 100rpx;
					text-align: center;
				}
				&-cont{
					border-bottom: 1px solid #e6e6e6;
					width: 585rpx;
					justify-content: space-between;
					padding: 18rpx 0;
					&-input{
						width: 480rpx;
						padding-left: 40rpx;
					}
					&-icon{
						width: 50rpx;
						height: 50rpx;
					}
				}
			}
			&-btn{
				width: 100%;
				background-color: #0aac2a;
				color: #FFFFFF;
				font-size: 36rpx;
				text-align: center;
				border-radius: 50px;
				line-height: 98rpx;
				margin-top: 46rpx;
			}
		}
		&-list{
			padding: 0 35rpx;
			margin-top: 40rpx;
			&-title{
				font-size: 36rpx;
			}
			&-page{
				&-item{
					height: 150rpx;
					border-bottom: 1px solid #e6e6e6;
					&-icon{
						width: 100rpx;
						height: 100rpx;
						margin-right: 30rpx;
					}
					&-info{
						&-id{
							font-size: 36rpx;
						}
						&-name{
							font-size: 30rpx;
							color: #808080;
						}
					}
				}
			}
		}
	}
	
</style>
